/***
 * window通过弹窗显示出来，给用户选择单位和人员信息的。
 * 
 * 
 */

Ext.ns('Ext.mc');

//
Ext.mc.ShowWindow = Ext.extend(Ext.Window,{
	modal:true,
	title:'项目成果详情',
	cloasable : true,
//	height:400,
	width: 1000,
	buttonAlign: 'center',
	
	initComponent : function(){
		this._panel = new Ext.form.FormPanel({
		layout:'column',
		items:[{
			xtype:'form',
			layout:'form',
			boder:false,
			items:[{
				xtype:'textfield',
				fieldLabel : '项目编号',
				id : this.id+'projectnumber',
				name : 'result.proejectnumber',
				readOnly : true,
			},{
				xtype:'textfield',
				fieldLabel : '项目名称',
				readOnly : true,
				name : 'result.projectname',
				id:this.id+'projectname'
			},{
				xtype:'numberfield',
				fieldLabel : '发明专利申请',
				name : 'result.actualresultsid',
				id:this.id+'inventpatentapplication'
			},{
				xtype:'numberfield',
				fieldLabel : '发明专利授权',
				name : 'result.inventpatentauthorization',
				id:this.id+'inventpatentauthorization'
			},{
				xtype : 'numberfield',
				fieldLabel : '使用新型申请',
				name : 'result.usenewapplication',
				id:this.id+'usenewapplication'
			},{
				xtype : 'numberfield',
				fieldLabel : '使用新型授权',
				name : 'result.usenewauthorization',
				id: this.id+'usenewauthorization'
			},{
				xtype : 'numberfield',
				fieldLabel : '外观设计申请',
				name : 'result.appearancedesignapplication',
				id:this.id+'appearancedesignapplication'
			},{
				xtype : 'numberfield',
				fieldLabel : '外观设计授权',
				name : 'result.appearancedesignauthorization',
				id:this.id+'appearancedesignauthorization'
			},{
				xtype : 'numberfield',
				name : 'result.foreignpatent',
				fieldLabel : '外国专利',
				id:this.id+'foreignpatent'
			}]
		},{
			xtype:'form',
			layout:'form',
			border: false,
			items:[{
				xtype : 'numberfield',
				name : 'result.newtechnology',
				fieldLabel : '新工艺',
				id:this.id+'newtechnology'
			},{
				xtype:'numberfield',
				name : 'result.newproduct',
				fieldLabel : '新产品',
				id:this.id+'newproduct'
			} ,{
				xtype:'textfield',
				name : 'result.newmaterial',
				fieldLabel : '新材料',
				id:this.id+'newmaterial'
			},{
				xtype:'numberfield',
				fieldLabel : '新装备',
				name : 'result.newequipment',
				id:this.id+'newequipment'
			},{
				xtype:'numberfield',
				name : 'result.computersoftware',
				fieldLabel : '计算机软件',
				id:this.id+'computersoftware'
			},{
				xtype:'numberfield',
				name : 'result.paper',
				fieldLabel : '论文论著',
				id:this.id+'paper'
			},{
				xtype:'numberfield',
				name : 'result.technologystandard',
				fieldLabel : '技术标准',
				id:this.id+'technologystandard'
			},{
				xtype:'numberfield',
				name : 'result.nationalaward',
				fieldLabel : '国家奖励',
				id:this.id+'nationalaward'
			},{
				xtype:'numberfield',
				name : 'result.provincialaward',
				fieldLabel : '省级奖励',
				id:this.id+'provincialaward'
			}]
		},{
			xtype:'form',
			layout:'form',
			border:false,
			items:[{
				xtype:'numberfield',
				name : 'result.cityaward',
				fieldLabel : '市级奖励',
				id:this.id+'cityaward'
			},{
				xtype:'numberfield',
				name : 'result.doctor',
				fieldLabel : '博士',
				id:this.id+'doctor'
			},{
				xtype:'numberfield',
				name : 'result.master',
				fieldLabel : '硕士',
				id:this.id+'master'
			},{
				xtype:'numberfield',
				name : 'result.undergraduate',
				fieldLabel : '本科',
				id:this.id+'undergraduate'
			},{
				xtype:'numberfield',
				name : 'result.fundsavailable',
				fieldLabel : '到位经费',
				id:this.id+'fundsavailable'
			},{
				xtype:'numberfield',
				name : 'result.fundsinvestment',
				fieldLabel : '经费投入',
				id:this.id+'fundsinvestment'
			},{
				xtype:'numberfield',
				name : 'result.benefitacquired',
				fieldLabel : '已获效益',
				id:this.id+'benefitacquired'
			},{
				xtype:'textarea',
				name : 'result.actualresultsid',
				fieldLabel : '项目总结',
				style:'width: 300px; height: 100px;',
				id:this.id+'projectsummary'
			}]
		}]});
		this.items = this._panel;

		this.buttons = [{
			xtype:'button',
			text:'确定',
			handler : function(b,e){
			var a = b.findParentBy(function(ct, cmp) { 
				return (ct instanceof Ext.mc.ShowWindow) ? true : false; 
			});
			a.close();
		
		}}];
		Ext.mc.ShowWindow.superclass.initComponent.call(this);
}
});








